﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace StudentManagement.Utils
{
    public class Util
    {
        public static DateTime? StringToDateTime(string datetimeString)
        {
            DateTime datetime;
            if (DateTime.TryParseExact(datetimeString, "dd/MM/yyyy", null, DateTimeStyles.None, out datetime))
            {
                return datetime;
            }
            return null;
        }
        public static int CompareString(string source, string target)
        {
            return source.CompareTo(target);
            //1 : source > target
            //0 : = 
            // -1 : source < target
        }
    }
}
